package com.cloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @BelongsProject: my
 * @BelongsPackage: com.cloud.controller
 * @Author: ji ge
 * @CreateTime: 2024-02-01  15:13
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
@RequestMapping("")

public class OrderController {
    private static final String INVOKE_URL ="http://consul-provider-payment";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/consumer/paymentConsul")
    public String paymentConsul(){
        return restTemplate.getForObject(INVOKE_URL+"/payment/paymentConsul",String.class);
    }
}
